<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_restaurant.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Mall_restaurant.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '餐饮列表',
        name: 'Mall_restaurant',
        url: '/Mall_restaurant/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        restaurant_Type: '',
        supplier_Name: '',
        hotel_Name: '',
        restaurant_Image: [],
        restaurant_Name: '',
        restaurant_Location: '',
        reception_Phone: '',
        restaurant_Introduction: '',
        restaurant_State: '',
        describes: '',
        trade_point: '',
        hotel_ID: '',
        jsonStringBusiness: '',
        jsonStringLabel: '',
        jsonStringCarousel: [],
        is_open: '',
        distributorNews_id: '',
        restaurant_address: '',
        order_type: '',
      },
      editFormOptions: [
        [
          {
            dataKey: 'mall_supplier',
            data: [],
            title: '供应商名称',
            required: true,
            field: 'supplier_Name',
            colSize: 6,
            type: 'select',
          },
          {
            title: '餐厅名称',
            field: 'restaurant_Name',
            type: 'text',
            colSize: 6,
            required: true,
          },
        ],
        [
          {
            title: '餐厅头图',
            field: 'restaurant_Image',
            type: 'imgupgrade',
            maxSize: 1,
            required: false,
            colSize: 3,
            maxFile: 1,
            multiple: true,
          },
          {
            title: '轮播图',
            maxSize: 1,
            field: 'jsonStringCarousel',
            colSize: 9,
            type: 'imgupgrade',
            maxFile: 5,
            multiple: true,
          },
          {
            title: '餐厅类型',
            field: 'restaurant_Type',
            colSize: 6,
            required: true,
            type: 'select',
            data: [
              {
                value: '社会类型',
                key: '0',
              },
              {
                value: '酒店类型',
                key: '1',
              },
            ],
          },
          {
            dataKey: 'Label',
            data: [],
            title: '搜索关键字',
            field: 'jsonStringLabel',
            colSize: 6,
            type: 'selectList',
          },
        ],
        [
          {
            title: 'hotelID',
            field: 'hotel_ID',
            type: 'text',
            colSize: 6,
            required: false,
            hidden: true,
          },
          {
            title: '营业点代码',
            field: 'trade_point',
            required: false,
            type: 'text',
            colSize: 6,
            hidden: true,
          },
        ],
        [
          {
            title: '餐厅地点',
            field: 'restaurant_Location',
            required: true,
            dataKey: '',
            align: 'left',
            remote: true,
            data: [],
            placeholder: '输入位置关键字段搜索',
            type: 'select',
            colSize: 6,
          },
          {
            title: '营业时间',
            field: 'jsonStringBusiness',
            type: 'text',
            colSize: 6,
            required: true,
          },
        ],
        [
          {
            title: '餐厅详细地点',
            field: 'restaurant_address',
            type: 'text',
            colSize: 12,
            required: true,
          },
        ],
        [
          {
            title: '餐厅图文介绍',
            field: 'restaurant_Introduction',
            dataKey: 'catering_Introduction',
            data: [],
            required: true,
            colSize: 6,
            type: 'select',
          },
          {
            title: '前台电话',
            field: 'reception_Phone',
            type: 'text',
            colSize: 6,
            type: 'text',
            required: true,
          },
        ],
        [
          {
            title: '餐厅状态',
            field: 'restaurant_State',
            colSize: 6,
            type: 'radio',
            dataKey: 'hotel_State',
            data: [],
            required: true,
          },
          {
            title: '是否公开',
            field: 'is_open',
            colSize: 4,
            type: 'switch',
          },
        ],
        [
          {
            title: '门店选择模式',
            field: 'order_type',
            colSize: 6,
            type: 'radio',
            dataKey: '',
            data: [
              { value: '堂食点餐', key: '1' },
              { value: '门店自取', key: '2' },
            ],
            required: true,
          },
        ],
        [
          {
            title: '直营分销商',
            dataKey: '',
            data: [],
            field: 'distributorNews_id',
            colSize: 6,
            type: 'selectList',
            hidden: true,
          },
        ],
        [
          {
            title: '描述',
            field: 'describes',
            type: 'textarea',
            title: '描述',
            colSize: 12,
          },
        ],
      ],
      searchFormFields: { hotel_Name: '', restaurant_Name: '' },
      searchFormOptions: [
        [
          { title: '餐厅名称', field: 'restaurant_Name', type: 'like' },
          { title: '酒店名称', field: 'hotel_Name', type: 'like' },
        ],
      ],
      columns: [
        {
          field: 'restaurant_Image',
          title: '餐厅头图',
          type: 'imgupgrade',
          width: 100,
          required: false,
          align: 'left',
        },
        {
          field: 'restaurant_Name',
          title: '餐厅名称',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'restaurant_State',
          title: '餐厅状态',
          type: 'int',
          width: 90,
          align: 'left',
          bind: {
            key: 'hotel_State',
            data: [],
          },
        },
        {
          field: 'restaurant_Type',
          title: '餐厅类型',
          type: 'string',
          width: 220,
          align: 'left',
          bind: {
            key: '',
            data: [
              {
                value: '社会餐厅',
                key: '0',
              },
              {
                value: '酒店餐厅',
                key: '1',
              },
            ],
          },
        },
        {
          field: 'hotel_ID',
          title: 'hotel_ID',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'trade_point',
          title: '营业点代码',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'describes',
          title: '描述',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'id',
          title: '主键',
          type: 'string',
          sort: true,
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: 'left',
        },
        {
          field: 'merchantCode',
          title: '商户编码',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'merchantName',
          title: '商户名称',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'createDate',
          title: '创建时间',
          type: 'datetime',
          width: 190,
          align: 'left',
          sortable: true,
        },
        {
          field: 'createID',
          title: '创建人ID',
          type: 'int',
          width: 90,
          hidden: true,
          align: 'left',
        },
        {
          field: 'creator',
          title: '创建人',
          type: 'string',
          width: 120,
          align: 'left',
        },
        {
          field: 'modifier',
          title: '修改人',
          type: 'string',
          width: 120,
          align: 'left',
        },
        {
          field: 'modifyDate',
          title: '修改时间',
          type: 'datetime',
          width: 190,
          align: 'left',
          sortable: true,
        },
        {
          field: 'modifyID',
          title: '修改人ID',
          type: 'int',
          width: 90,
          hidden: true,
          align: 'left',
        },
        {
          field: 'reception_Phone',
          title: '前台电话',
          type: 'string',
          width: 120,
          align: 'left',
        },
        {
          field: 'restaurant_ID',
          title: '餐厅ID',
          type: 'string',
          width: 220,
          hidden: true,
          align: 'left',
        },

        {
          field: 'restaurant_Introduction',
          title: '餐厅图文介绍',
          type: 'string',
          width: 220,
          align: 'left',
          bind: {
            key: 'catering_Introduction',
            data: [],
          },
        },
        {
          field: 'restaurant_Location',
          title: '餐厅地点',
          dataKey: '',
          width: 220,
          align: 'left',
          remote: true,
          data: [],
          placeholder: '输入位置关键字段搜索',
          type: 'select',
        },

        {
          field: 'restaurant_score',
          title: '分数',
          type: 'string',
          width: 120,
          align: 'left',
        },

        // {
        //   field: 'supplier_Code',
        //   title: '供应商编码',
        //   type: 'string',
        //   width: 90,
        //   align: 'left',
        // },
        {
          field: 'supplier_Name',
          title: '供应商名称',
          type: 'string',
          width: 120,
          align: 'left',
          bind: {
            key: 'mall_supplier',
            data: [],
          },
        },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
